import Vue from 'vue'
import App from './App.vue'
import ElementUI, { Button, Select } from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.config.productionTip = false

Vue.use(ElementUI)

//要把router注册到vue里
import vuerouter from 'vue-router'
Vue.use(vuerouter);
// 是指路由重复。
const originalPush = vuerouter.prototype.push;
// 修改 原型对象中的push方法
vuerouter.prototype.push = function push(location) {
    return originalPush.call(this, location).catch(err => err)
};

//注册router
import router from './router/router';
// 导入仓库
import store from './js/store.js'

new Vue({
  store,
  router,
  render: h => h(App),
}).$mount('#app')
